home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 52
/
Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso
/
Aminet
/
dev
/
lang
/
amigatalk.lha
/
intuition
/
BoopsiSpeedbarTags.st
< prev
next >
Wrap
Text File
|
2002-05-07
|
5KB
|
123 lines
" --------------------------------------------------------------------- "
" BoopsiSpeedbarTags Class is a Singleton class that allows the user "
" to reference BOOPSI Speedbar class tags' hexadecimal values. "
""
" EXAMPLE: 'myTag <- speedbarTags getTag: #SPEEDBAR_Buttons' "
""
" ALL singleton classes MUST contain the following: "
""
" the methods: isSingleton AND privateSetup AND "
" uniqueInstance Class instance variable. "
" --------------------------------------------------------------------- "
Class BoopsiSpeedbarTags :Dictionary ! uniqueInstance !
[
isSingleton
^ true
|
privateNew ! newinstance !
newinstance <- super new.
^ newinstance
|
new
^ self privateSetup
|
getTag: tagKey
^ self at: tagKey
|
privateInitializeDictionary
" Defines for the speedbar node attributes: "
self at: #SBNA_Left put: 16r80010001. " (WORD) left offset of button. "
self at: #SBNA_Top put: 16r80010002. " (WORD) top offset of button. "
self at: #SBNA_Width put: 16r80010003. " (WORD) width of button. "
self at: #SBNA_Height put: 16r80010004. " (WORD) height of button. "
self at: #SBNA_UserData put: 16r80010005. " (APTR) user data, have a blast. "
self at: #SBNA_Enabled put: 16r80010006. " (BOOL) Is this button enabled?. "
self at: #SBNA_Spacing put: 16r80010007. " (WORD) spacing from last button. "
self at: #SBNA_Highlight put: 16r80010008. " (WORD) highlight mode (see below). "
" (struct Image *) render image pointer. "
self at: #SBNA_Image put: 16r80010009.
" (struct Image *) select image pointer. "
self at: #SBNA_SelImage put: 16r8001000A.
" (UBYTE *) optional help text message pointer. "
self at: #SBNA_Help put: 16r8001000B.
" (BOOL) Make button a toggle button "
self at: #SBNA_Toggle put: 16r8001000C.
" (BOOL) Sets state of a toggle button "
self at: #SBNA_Selected put: 16r8001000D.
" (BOOL) Mutual Exclusion Group Button, implies SBNA_Toggle "
self at: #SBNA_MXGroup put: 16r8001000E.
" (BOOL) Disable this button, ghost pattern to be rendered "
self at: #SBNA_Disabled put: 16r8001000F.
" Possible highlight modes. "
self at: #SBH_NONE put: 0.
self at: #SBH_BACKFILL put: 1.
self at: #SBH_RECESS put: 2.
self at: #SBH_IMAGE put: 3.
self at: #SPEEDBAR_Buttons put: 16r85013001. " (struct List *) button list "
" (WORD) Horizontal/vertical mode "
self at: #SPEEDBAR_Orientation put: 16r85013002.
" (UWORD) SpeedBar Background color "
self at: #SPEEDBAR_Background put: 16r85013003.
" (struct Window *) Window for WindowBar help "
self at: #SPEEDBAR_Window put: 16r85013004.
" (BOOL) Allow struming of button bar "
self at: #SPEEDBAR_StrumBar put: 16r85013005.
self at: #SPEEDBAR_OnButton put: 16r85013006. " (WORD) Turn on a button by id# "
self at: #SPEEDBAR_OffButton put: 16r85013007. " (WORD) Turn off a button by id# "
self at: #SPEEDBAR_ScrollLeft put: 16r85013008. " (WORD) Scroll buttons left "
self at: #SPEEDBAR_ScrollRight put: 16r85013009. " (WORD) Scroll buttons right "
self at: #SPEEDBAR_Top put: 16r8501300A. " (WORD) First visible "
self at: #SPEEDBAR_Visible put: 16r8501300B. " (WORD) Number visible "
self at: #SPEEDBAR_Total put: 16r8501300C. " (WORD) Total in list "
" (STRPTR) Window/Screen Help Text "
self at: #SPEEDBAR_Help put: 16r8501300D.
" (WORD) Bevel box style (BVS_BUTTON,BVS_THIN,BVS_NONE) "
self at: #SPEEDBAR_BevelStyle put: 16r8501300E.
" (STRPTR) last selected speedbar node number "
self at: #SPEEDBAR_Selected put: 16r8501300F.
" (STRPTR) last selected speedbar node pointer "
self at: #SPEEDBAR_SelectedNode put: 16r85013010.
" (BOOL) size all buttons in bar evenly, using the largest image "
self at: #SPEEDBAR_EvenSize put: 16r85013011.
" SPEEDBAR_Orientation Modes "
self at: #SBORIENT_HORIZ put: 0.
self at: #SBORIENT_VERT put: 1.
" OBSOLETE DO NOT USE. "
self at: #SPEEDBAR_HORIZONTAL put: 0.
self at: #SPEEDBAR_VERTICAL put: 1.
|
privateSetup
(uniqueInstance isNil)
ifTrue: [uniqueInstance <- self privateNew.
self privateInitializeDictionary.
].
^ self "or ^ uniqueInstance??"
]